package com.example.idachuappone.wxapi;

import android.widget.Toast;
import cn.sharesdk.wechat.utils.WXAppExtendObject;
import cn.sharesdk.wechat.utils.WXMediaMessage;
import cn.sharesdk.wechat.utils.WechatHandlerActivity;

public class WXEntryActivity extends WechatHandlerActivity {
	@Override
	public void onGetMessageFromWXReq(WXMediaMessage msg) {
		startActivity(getPackageManager().getLaunchIntentForPackage(getPackageName()));
	}

	@Override
	public void onShowMessageFromWXReq(WXMediaMessage msg) {
		if (msg != null && msg.mediaObject != null && (msg.mediaObject instanceof WXAppExtendObject)) {
			Toast.makeText(this, ((WXAppExtendObject) msg.mediaObject).extInfo, 0).show();
		}
	}
}